// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINFRM_H__C0CAC87B_42BE_441F_90E9_7A484B73896E__INCLUDED_)
#define AFX_MAINFRM_H__C0CAC87B_42BE_441F_90E9_7A484B73896E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

const UINT WM_UPDATEDATA = ::RegisterWindowMessage(_T("UpdateData"));

class CKWServerTreeView;
class CKWServerListView;

struct ConnectionStruct;
struct ConnectionStructEx;

class CMainFrame : public CFrameWnd
{
protected: // create from serialization only
	CMainFrame();
	DECLARE_DYNCREATE(CMainFrame)

	// Attributes
public:

	// Operations
public:

	// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
	//}}AFX_VIRTUAL

	// Implementation
public:
	CKWServerTreeView * GetpTreeView() const {return (CKWServerTreeView *)(m_wndSplitter.GetPane(0, 0));}
	CKWServerListView * GetpListView() const {return (CKWServerListView *)(m_wndSplitter.GetPane(0, 1));}
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CStatusBar  m_wndStatusBar;
	CToolBar    m_wndToolBar;

	// Generated message map functions
protected:
	CSplitterWnd m_wndSplitter;
	//{{AFX_MSG(CMainFrame)
	afx_msg void OnUpdateListView(WPARAM wParam, LPARAM lParam);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnDestroy();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnNotifyCoalMineSendingDefinition();
	afx_msg void OnNotifySendData();
	afx_msg void OnAutoReportConfig();
	afx_msg void OnSysUsermanager();
	afx_msg void OnSaveAll();
	afx_msg void OnAppExit();
	afx_msg void OnClose();
	//}}AFX_MSG
	afx_msg LRESULT OnReceived(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnConnected(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnDisconnected(WPARAM wParam, LPARAM lParam);
	afx_msg void OnUpdateData(WPARAM wParam,LPARAM lParam );
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MAINFRM_H__C0CAC87B_42BE_441F_90E9_7A484B73896E__INCLUDED_)
